﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spring.Aop;
using System.Reflection;
using JCode.Common.Logging;
namespace JCode.Common
{
    //[assembly: log4net.Config.XmlConfigurator(ConfigFile = @"bin\\Config\\Log4Net.config", Watch = true)]
    public class LoggingThrowsAdvice : IThrowsAdvice
    {
        public LoggingThrowsAdvice()
        {
            //logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
            //log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("Log4Net.config"));
        }

        public void AfterThrowing(Exception ex)
        {
            Logger.Error("异常的内容为: {0}", ex);

        }
    }
}
